<!DOCTYPE html>
<html lang="en">
<head th:include="certificateWeb/headFoot :: headerCss">
</head>
<link rel="stylesheet" href="/css/certificateWeb/stationApplyFor/stationApplyFor.css">
<body id="body">
<div th:include="certificateWeb/headFoot :: header"></div>
<style>
    .line {
        text-align: center;
        border-bottom: 1px solid #CFCFCF;
        clear: both;
        margin-top: 20px
    }

    .span_1 {
        width: 180px
    }
    .span_xz {
        width: 380px;
        height: 200px;
    }

    .cd {
        width: 130px;
        display: inline-block;
        margin: 20px auto auto auto;
    }

    .dong {
        width: 55px;
        display: inline-block;
        margin: 20px auto auto auto;
    }

    .jshi {
        width: 55px;
        display: inline-block;
        margin: 20px auto auto auto;
    }

    .addBtn {
        width: 440px;
        height: 35px;
        background-color: #dddee1;
        border-radius: 3px;
        margin: 20px auto 20px 95px;
        color: #515c34;
        font-weight: bold;
        border: 0px;
    }

    .del {
        width: 55px;
        color: #00b7ee;
        background-color: #dddee1;
        margin-left: 15px;
        display: inline-block;
        border-radius: 3px;
        text-align: center;
        font-size: 16px;
        line-height: 25px;
        margin-top: 34px;
    }
</style>
<main id="main">
    <section class="sec_1">
        <div class="div_1">
            <ul>
                <li  id="a1"><a href="/certificate/testingCentreApplyFor?type=5&profileType=0">幼儿照护考核站点申请</a></li>
                <li  id="a2"><a href="/certificate/testingCentreApplyFor?type=5&profileType=1">产后恢复考核站点申请</a></li>
                <li class="this" id="b1"><a href="/certificate/testingCentreApplyForPx?type=1">培训基地申请</a></li>            </ul>
        </div>
        <div class="div_2" id="testingBox">
            <label class="label_title">培训基地申请</label>
            <hr/>
            <div id="edit"></div>
            <!--            <form id="formId">-->
            <div class="line">单位信息</div>
            <span>
                    <input type="hidden" id="cnsFile" th:value="${commitment}"/>
                    <input type="hidden" id="cnTitle" value="承诺书模板下载"/>
             </span>
            <div class="div_3">
                <label class="span_1">单位所属省份<span style="color: #D52525">*</span>：</label>
                <div id="adre">
                    <select class="form-control inp_1" id="province" name="province">
                    </select>
                </div>
            </div>
            <div class="div_3">
                <label class="span_1">单位名称<span style="color: #D52525">*</span>：</label>
                <input type="text" name="enterpriseName" th:value="${enterpriseName}" id="enterpriseName" placeholder="请输入机构名称"
                       class="form-control inp_1"/>
            </div>
            <div class="div_3">
                <label class="span_1">单位地址<span style="color: #D52525">*</span>：</label>
                <input type="text" th:value="${enterpriseAddress}" id="enterpriseAddress" placeholder="请输入单位地址" name="enterpriseAddress"
                       class="form-control inp_1"/>
            </div>
            <div class="div_3">
                <label class="span_1">法人代表<span style="color: #D52525">*</span>：</label>
                <input type="text" th:value="${enterprisePerson}" placeholder="请输入法人代表姓名" id="enterprisePerson"  class="form-control inp_1 enterprisePerson"/>
            </div>
            <div class="div_3">
                <label class="span_1">营业范围<span style="color: #D52525">*</span>：</label>
                <input type="text" th:value="${businessScope}"  placeholder="请输入营业范围" id="businessScope"  class="form-control inp_1 businessScope"/>
            </div>


            <div class="line">单位联系人信息</div>
            <div id="info">

            </div>


        </div>
        <div style="clear: both"></div>
        <input type="hidden" id="applicationEndTime" th:value="${applicationEndTime}"/>
        <input type="hidden" id="applicationSlogan" th:value="${applicationSlogan}"/>
    </section>
</main>
<div th:include="certificateWeb/headFoot :: footer"></div>
<script src="/js/plugins/layer/layer.min.js" th:src="@{/js/plugins/layer/layer.min.js}"></script>
<script src="/js/plugins/validate/jquery.validate.extend.js"></script>
<script type="text/javascript" src="/js/jquery-form.js"></script>
<script src="/js/jquery.citys.js"></script>
</body>
<script>
    var educationUploadIndex=1;
    var expertEducationUploadIndex=1;
    var expertCertificatesUploadIndex=1;
    $(function () {
        //考核站点申请截止标语及截止时间
        var applicationEndTime = $("#applicationEndTime").val();
        var applicationSlogan = $("#applicationSlogan").val();
        var changeTime = new Date(applicationEndTime.replace(/-/g, "/")).getTime();
        var totalSecond = (changeTime - Date.parse(new Date())) / 1000;
        //判断是否到截止时间
        if (applicationEndTime != '') {
            if (totalSecond < 0) {
                $("#testingBox").html('<div style="padding:10px 20px;font-size:18px">' + applicationSlogan + '</div>');
                return false
            }
        }
        ajaxToken("/jzApi/user/selUserDetail", "GET", {}, function (res) {
        });
        ajaxToken("/certificate/findTrainInfo", "Post", {}, function (res) {
            var cnFile = $('#cnsFile').val();
            var cnTitle = $('#cnTitle').val();
            var adminteam = null;
            var adminTeamDiv = '';
            var expertTeam = null;
            var expertTeamDiv='';
            var cooperationEnterprise = null;
            var cooperationEnterpriseDiv = '';
            var info = '';
            //  console.log("res.orgNews.province",res.orgNews.province)
            if (res.trainInfoDO != null) {
                if (res.trainInfoDO.province != null) {
                    $('#adre').citys({province: res.trainInfoDO.province});
                } else {
                    $('#adre').citys({province: "请选择"});
                }
                //管理团队
                if (res.trainInfoDO.adminTeam != null) {
                    educationUploadIndex=0;
                    adminteam = JSON.parse(res.trainInfoDO.adminTeam);
                    var sc1 = '';
                    adminteam.forEach(function (item, index) {
                        if (adminteam.length > 1) {
                            if (index != 0) {
                                sc1 = '<span class="del delAdminTeam" id="delAdminTeam">删除</span>';
                            } else {
                                sc1 = '';
                            }
                        }

                        var a = '';
                        if (item.adminType == '专职管理人员') {
                            a += '<option value="" >请选择人员类型</option>' +
                                '<option value="专职管理人员" selected>专职管理人员</option>' +
                                ' <option value="专职工作人员">专职工作人员</option>'
                        } else if (item.adminType == '专职工作人员') {
                            a += '<option value="" >请选择人员类型</option>' +
                                '<option value="专职管理人员">专职管理人员</option>' +
                                ' <option value="专职工作人员" selected>专职工作人员</option>'
                        } else {
                            a += '<option value="" >请选择人员类型</option>' +
                                '<option value="专职管理人员">专职管理人员</option>' +
                                ' <option value="专职工作人员">专职工作人员</option>'
                        }
                        adminTeamDiv += '<div class="adminTeamDiv">' +
                            '                   <div class="div_3">' +
                            '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" placeholder="请输入姓名" value="'+item.adminName+'"  class="form-control inp_1 adminName"/>' + sc1 +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.education+'"  placeholder="学历" class="form-control inp_1 education"/>' +
                            '                    </div>' +
                            '            	 <div class="div_3">' +
                            '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="educationUpload'+index+'">' +
                            '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                            '               	 	 </button>' +
                            '                	 <input type="text" style="opacity:0;width: 1px;" value="'+item.educationFile+'" class="educationFile" id="educationFile'+index+'" name="educationFile'+index+'"/>' +
                            '                	 <span id="educationFileTest'+index+'">'+subFileName(item.educationFile)+'</span>' +
                            '            	 </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.position+'"  placeholder="职务"  class="form-control inp_1 position"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">人员类型<span style="color: #D52525">*</span>：</label>' +
                            '                        <select class="form-control inp_1 adminType">' + a +
                            '                        </select>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="number" value="'+item.adminMobile+'" placeholder="联系电话"  class="form-control inp_1 adminMobile"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.adminWork+'" placeholder="工作职责"  class="form-control inp_1 adminWork"/>' +
                            '                    </div>' +
                            '               </div>';
                        educationUploadIndex+=1;
                    });

                }else{
                    adminTeamDiv+= '<div class="adminTeamDiv">' +
                        '                   <div class="div_3">' +
                        '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 adminName"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="学历" class="form-control inp_1 education"/>' +
                        '                    </div>' +
                        '            	 <div class="div_3">' +
                        '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                        '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="educationUpload0">' +
                        '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                        '               	 	 </button>' +
                        '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="educationFile" id="educationFile0" name="educationFile0"/>' +
                        '                	 <span id="educationFileTest0"></span>' +
                        '            	 </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="职务"  class="form-control inp_1 position"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">人员类型<span style="color: #D52525">*</span>：</label>' +
                        '                        <select class="form-control inp_1 adminType">' +
                        '                            <option value="">请选择人员类型</option>' +
                        '                            <option value="专职管理人员">专职管理人员</option>' +
                        '                            <option value="专职工作人员">专职工作人员</option>' +
                        '                        </select>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="number"  placeholder="联系电话"  class="form-control inp_1 adminMobile"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 adminWork"/>' +
                        '                    </div>' +
                        '               </div>';
                }

                //专家团队
                if(res.trainInfoDO.expertTeam != null){
                    expertEducationUploadIndex=0;
                    expertCertificatesUploadIndex=0;
                    expertTeam = JSON.parse(res.trainInfoDO.expertTeam);
                    var sc1 = '';
                    expertTeam.forEach(function (item, index) {
                        if (expertTeam.length > 1) {
                            if (index != 0) {
                                sc1 = '<span class="del delExpertTeam" id="delExpertTeam">删除</span>';
                            } else {
                                sc1 = '';
                            }
                        }
                        var a = '';
                        if (item.expertType == '师资及考评员') {
                            a += '<option value="" >请选择专家类型</option>' +
                                '<option value="师资及考评员" selected>师资及考评员</option>' +
                                ' <option value="考务技术员">考务技术员</option>'+
                                ' <option value="督导员">督导员</option>'+
                                ' <option value="其他">其他</option>'
                        } else if (item.expertType == '考务技术员') {
                            a += '<option value="" >请选择专家类型</option>' +
                                '<option value="师资及考评员" >师资及考评员</option>' +
                                ' <option value="考务技术员" selected>考务技术员</option>'+
                                ' <option value="督导员">督导员</option>'+
                                ' <option value="其他">其他</option>'
                        }else if (item.expertType == '督导员') {
                            a += '<option value="" >请选择专家类型</option>' +
                                '<option value="师资及考评员" >师资及考评员</option>' +
                                ' <option value="考务技术员" >考务技术员</option>'+
                                ' <option value="督导员" selected>督导员</option>'+
                                ' <option value="其他">其他</option>'
                        } else if (item.expertType == '其他') {
                            a += '<option value="" >请选择专家类型</option>' +
                                '<option value="师资及考评员" >师资及考评员</option>' +
                                ' <option value="考务技术员" >考务技术员</option>'+
                                ' <option value="督导员" >督导员</option>'+
                                ' <option value="其他" selected>其他</option>'
                        }  else {
                            a += '<option value="" >请选择专家类型</option>' +
                                '<option value="师资及考评员" >师资及考评员</option>' +
                                ' <option value="考务技术员" >考务技术员</option>'+
                                ' <option value="督导员" >督导员</option>'+
                                ' <option value="其他">其他</option>'
                        }

                        expertTeamDiv+='<div class="expertTeamDiv">' +
                            '                   <div class="div_3">' +
                            '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertName+'" placeholder="请输入姓名"  class="form-control inp_1 expertName"/>' +sc1+
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertEducation+'"  placeholder="学历" class="form-control inp_1 expertEducation"/>' +
                            '                    </div>' +
                            '            	 <div class="div_3">' +
                            '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertEducationUpload'+index+'">' +
                            '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                            '               	 	 </button>' +
                            '                	 <input type="text" style="opacity:0;width: 1px;" value="'+item.expertEducationFile+'" class="expertEducationFile" id="expertEducationFile'+index+'" name="expertEducationFile'+index+'"/>' +
                            '                	 <span id="expertEducationFileTest'+index+'">'+subFileName(item.expertEducationFile)+'</span>' +
                            '            	 </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertPosition+'"  placeholder="职务"  class="form-control inp_1 expertPosition"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">职称<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertJobName+'"  placeholder="职称"  class="form-control inp_1 expertJobName"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">专家类型<span style="color: #D52525">*</span>：</label>' +
                            '                        <select class="form-control inp_1 expertType">' + a +
                            '                        </select>' +
                            '                    </div>' +
                            '            	 <div class="div_3">' +
                            '                	 <label class="span_1">专家证件材料<span style="color: #D52525">*</span>：</label>' +
                            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertCertificatesUpload'+index+'">' +
                            '                    		 <i class="fa fa-cloud"></i>请上传专家证件材料' +
                            '               	 	 </button>' +
                            '                	 <input type="text" value="'+item.expertCertificatesFile+'" style="opacity:0;width: 1px;" value="" class="expertCertificatesFile" id="expertCertificatesFile'+index+'" name="expertCertificatesFile'+index+'"/>' +
                            '                	 <span id="expertCertificatesFileTest'+index+'">'+subFileName(item.expertCertificatesFile)+'</span>' +
                            '            	 </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">专家证件编号<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertNum+'"  placeholder="专家证件编号"  class="form-control inp_1 expertNum"/>' +
                            '                        <span style="color:red">注意：如果是师资及考评员则需要填写两个编号，以英文分号(;)隔开</span>'+
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertMobile+'"  placeholder="联系电话"  class="form-control inp_1 expertMobile"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.expertWork+'"  placeholder="工作职责"  class="form-control inp_1 expertWork"/>' +
                            '                    </div>' +
                            '               </div>' ;
                        expertEducationUploadIndex+=1;
                        expertCertificatesUploadIndex+=1;
                   });
                }else{
                    expertTeamDiv+='<div class="expertTeamDiv">' +
                        '                   <div class="div_3">' +
                        '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 expertName"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="学历" class="form-control inp_1 expertEducation"/>' +
                        '                    </div>' +
                        '            	 <div class="div_3">' +
                        '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                        '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertEducationUpload0">' +
                        '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                        '               	 	 </button>' +
                        '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertEducationFile" id="expertEducationFile0" name="expertEducationFile0"/>' +
                        '                	 <span id="expertEducationFileTest0"></span>' +
                        '            	 </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="职务"  class="form-control inp_1 expertPosition"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">职称<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="职称"  class="form-control inp_1 expertJobName"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">专家类型<span style="color: #D52525">*</span>：</label>' +
                        '                        <select class="form-control inp_1 expertType">' +
                        '                            <option value="">请选择岗位</option>' +
                        '                            <option value="师资及考评员">师资及考评员</option>' +
                        '                            <option value="考务技术员">考务技术员</option>' +
                        '                            <option value="督导员">督导员</option>' +
                        '                            <option value="其他">其他</option>' +
                        '                        </select>' +
                        '                    </div>' +
                        '            	 <div class="div_3">' +
                        '                	 <label class="span_1">专家证件材料<span style="color: #D52525">*</span>：</label>' +
                        '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertCertificatesUpload0">' +
                        '                    		 <i class="fa fa-cloud"></i>请上传专家证件材料' +
                        '               	 	 </button>' +
                        '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertCertificatesFile" id="expertCertificatesFile0" name="expertCertificatesFile0"/>' +
                        '                	 <span id="expertCertificatesFileTest0"></span>' +
                        '            	 </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">专家证件编号<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="专家证件编号"  class="form-control inp_1 expertNum"/>' +
                        '                        <span style="color:red"></span>'+
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="联系电话"  class="form-control inp_1 expertMobile"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 expertWork"/>' +
                        '                    </div>' +
                        '               </div>' ;
                }

                //合作企业
                if(res.trainInfoDO.cooperationEnterprise != null){
                    cooperationEnterprise = JSON.parse(res.trainInfoDO.cooperationEnterprise);
                    var sc1 = '';
                    cooperationEnterprise.forEach(function (item, index) {
                        if (cooperationEnterprise.length > 1) {
                            if (index != 0) {
                                sc1 = '<span class="del delCooperationEnterprise" id="delCooperationEnterprise">删除</span>';
                            } else {
                                sc1 = '';
                            }
                        }
                        cooperationEnterpriseDiv+='<div class="cooperationEnterpriseDiv">' +
                            '                   <div class="div_3">' +
                            '                        <label class="span_1">企业名称<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.enterpriseName+'" placeholder="请输入企业名称"  class="form-control inp_1 enterpriseName"/>' +sc1+
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">营业地址<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.enterpriseAddress+'"  placeholder="营业地址" class="form-control inp_1 enterpriseAddress"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">主营业务<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.serviceMain+'" placeholder="主营业务"  class="form-control inp_1 serviceMain"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">法定代表人<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.enterprisePerson+'" placeholder="法定代表人"  class="form-control inp_1 enterprisePerson"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="text" value="'+item.contactName+'"  placeholder="联系人"  class="form-control inp_1 contactName"/>' +
                            '                    </div>' +
                            '                    <div class="div_3">' +
                            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                            '                        <input type="number" value="'+item.contactMobile+'" placeholder="联系电话"  class="form-control inp_1 contactMobile"/>' +
                            '                    </div>' +
                            '               </div>' ;
                    });
                }else{
                    cooperationEnterpriseDiv+='<div class="cooperationEnterpriseDiv">' +
                        '                   <div class="div_3">' +
                        '                        <label class="span_1">企业名称<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text" placeholder="请输入企业名称"  class="form-control inp_1 enterpriseName"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">营业地址<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="营业地址" class="form-control inp_1 enterpriseAddress"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">主营业务<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="主营业务"  class="form-control inp_1 serviceMain"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">法定代表人<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="法定代表人"  class="form-control inp_1 enterprisePerson"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="text"  placeholder="联系人"  class="form-control inp_1 contactName"/>' +
                        '                    </div>' +
                        '                    <div class="div_3">' +
                        '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                        '                        <input type="number"  placeholder="联系电话"  class="form-control inp_1 contactMobile"/>' +
                        '                    </div>' +
                        '               </div>' ;
                }
                $('#enterpriseName').val(res.trainInfoDO.enterpriseName);
                $('#enterpriseAddress').val(res.trainInfoDO.enterpriseAddress);
                $('#enterprisePerson').val(res.trainInfoDO.enterprisePerson);
                $('#businessScope').val(res.trainInfoDO.businessScope);
                info =
                    '            <div id="kptd">' +
                    '               <div class="kptd">' +

                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="联系人姓名" value="'+res.trainInfoDO.contacts+'" id="contacts"  class="form-control inp_1 contacts"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="职务" value="'+res.trainInfoDO.posts+'" id="posts"  class="form-control inp_1 posts"/>' +
                    '                    </div>' +

                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="number"  placeholder="联系电话" value="'+res.trainInfoDO.phone+'" id="phone"  class="form-control inp_1 phone"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">电子邮箱：</label>' +
                    '                        <input type="text"  placeholder="请输入电子邮箱" value="'+res.trainInfoDO.email+'" id="email"  class="form-control inp_1 email"/>' +
                    '                    </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    // '                <span><input type="button" onclick="insert();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +
                    '<div class="line">管理团队</div>' +
                    '    <div id="adminTeamDiv">' +
                    '            <div class="allInfo">'+
                    '               <div class="div_3">' +
                    '                        <label class="span_1">工作场地<span style="color: #D52525">*</span>：</label>' +
                    '                       <input type="text" value="'+res.trainInfoDO.adminWorkSpace+'" placeholder="工作场地" id="workSpace"  class="form-control inp_1 workSpace"/>' +
                    '                    </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="workSpaceUpload">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传工作场地支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.adminWorkSpaceFile+'" id="workSpaceFile" name="workSpaceFile"/>' +
                    '                	 <span id="workSpaceFileTest">'+subFileName(res.trainInfoDO.adminWorkSpaceFile)+'</span>' +
                    '            	 </div>' +
                    '            	 </div>' +
                                    adminTeamDiv +
                    '            </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '<div class="line">专家团队</div>' +
                    '    <div id="expertTeamDiv">' +
                                    expertTeamDiv +
                    '     </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert2();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '<div class="line">合作企业</div>' +
                    '    <div id="cooperationEnterpriseDiv">' +
                                cooperationEnterpriseDiv +
                    '      </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert3();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '            <div class="line">单位基本情况</div>' +
                    '            <div id="basicInfoExplainDiv">' +
                    '               <div class="basicInfoExplainDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea  id="basicInfoExplain" placeholder="单位基本情况，主要包括：现有员工数量、员工学历层次、每年新招人数、行业协会任职情况、获奖情况、参与标准建设情况、社会影响等"  class="form-control inp_2 basicInfoExplain">'+res.trainInfoDO.basicInfoExplain+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="basicInfoFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.basicInfoFile+'" id="basicInfoExplainEnclosure" name="basicInfoExplainEnclosure"/>' +
                    '                	 <span id="basicInfoFileTest">'+subFileName(res.trainInfoDO.basicInfoFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">考核评价工作基础</div>' +
                    '            <div id="assevaInfoExplainDiv">' +
                    '               <div class="assevaInfoExplainDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea  pla placeholder="考核评价工作基础，主要包括：近年来在幼儿照护领域组织开展考核评价，特别是承接政府委托的职业技能鉴定、考核评价相关业务情况，如考评的层次、结构、数量、规模等；考评有关管理规章制度等" id="assevaInfoExplain" class="form-control inp_2 assevaInfoExplain">' +
                                            res.trainInfoDO.assevaInfoExplain+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="assevaInfoFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.assevaInfoFile+'" id="assevaInfoExplainEnclosure" name="assevaInfoExplainEnclosure"/>' +
                    '                	 <span id="assevaInfoExplainTest">'+subFileName(res.trainInfoDO.assevaInfoFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">培训基本情况</div>' +
                    '            <div id="trainInfoDiv">' +
                    '               <div class="trainInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea  placeholder="培训基本情况，主要包括：开展培训的工种和层次、培训人数、师资团队介绍、培训教学资源、承接的扶贫培训工作开展情况、教学教务管理规章制度等" id="trainInfo" class="form-control inp_2 trainInfo">' +
                                            res.trainInfoDO.trainInfo+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="trainFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.trainFile+'" id="trainInfoEnclosure" name="trainInfoEnclosure"/>' +
                    '                	 <span id="trainInfoTest">'+subFileName(res.trainInfoDO.trainFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">实习/见习及就业基本情况</div>' +
                    '            <div id="internshipInfoDiv">' +
                    '               <div class="internshipInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="实习/见习及就业基本情况，主要包括：实习/见习基地建设情况、每年实习/见习人数、实习/见习制度、就业渠道建设情况、每年计划安排实习/见习及就业人数等" id="internshipInfo" class="form-control inp_2 internshipInfo">' +
                                            res.trainInfoDO.internshipInfo+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="internshipFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.internshipFile+'" id="internshipInfoEnclosure" name="internshipInfoEnclosure"/>' +
                    '                	 <span id="internshipInfoTest">'+subFileName(res.trainInfoDO.internshipFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">校企合作情况</div>' +
                    '            <div id="schoolEnterpriseInfoDiv">' +
                    '               <div class="schoolEnterpriseInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="校企合作，主要内容：与学校或企业合作的情况，如共同培养技能人才、共同开展教学资源库建设、共同开展课题建设、共同开展标准建设等" id="schoolEnterpriseInfo" class="form-control inp_2 schoolEnterpriseInfo">' +
                                            res.trainInfoDO.schoolEnterpriseInfo+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="schoolEnterpriseFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.schoolEnterpriseFile+'" id="schoolEnterpriseInfoEnclosure" name="schoolEnterpriseInfoEnclosure"/>' +
                    '                	 <span id="schoolEnterpriseInfoTest">'+subFileName(res.trainInfoDO.schoolEnterpriseFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">场地及设施设备情况</div>' +
                    '            <div id="equipmentInfoDiv">' +
                    '               <div class="equipmentInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea  placeholder="场地及设施设备情况，主要内容：目前开展社会考生培训的场地、设施设备等情况" id="equipmentInfo" class="form-control inp_2 equipmentInfo">' +
                                            res.trainInfoDO.equipmentInfo+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="equipmentFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="'+res.trainInfoDO.equipmentFile+'" id="equipmentInfoEnclosure" name="equipmentInfoEnclosure"/>' +
                    '                	 <span id="equipmentInfoTest">'+subFileName(res.trainInfoDO.equipmentFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">考核评价建议</div>' +
                    '            <div id="assessmentInfoDiv">' +
                    '               <div class="assessmentInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea  placeholder="考核评价建议，主要内容：下一步参与幼儿照护职业技能等级证书建设的有关工作考虑，能够提供的条件保障等" id="assessmentInfo" class="form-control inp_2 assessmentInfo">' +
                                        res.trainInfoDO.assessmentInfo+'</textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="assessmentFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;"  value="'+res.trainInfoDO.assessmentFile+'"  id="assessmentInfoEnclosure" name="assessmentInfoEnclosure"/>' +
                    '                	 <span id="assessmentInfoTest">'+subFileName(res.trainInfoDO.assessmentFile)+'</span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="div_3">' +
                    '                <label class="span_1">承诺书<span style="color: #D52525">*</span>：</label>' +
                    '                <button type="button" class="btn inp_1" style="margin-top: 20px" id="btnUpload">' +
                    '                    <i class="fa fa-cloud"></i>请盖章扫描后上传' +
                    '                </button>' +
                    '                <input type="text" value="'+res.trainInfoDO.commitmentFile+'" style="opacity:0;width: 1px;"  id="enclosure" name="enclosure"/>' +
                    '                <span id="test">'+ subFileName(res.trainInfoDO.commitmentFile) +'</span>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <label class="span_1">承诺书模板下载：</label>' +
                    '                <label style="height: 50px;float: left;margin: 20px 10px auto auto;font-size: 16px;line-height: 50px;">' +
                    '                    <a target="_blank" style="color: blue" download href="' + cnFile + '">' + cnTitle + '</a>' +
                    '                </label>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <label class="span_1">营业执照<span style="color: #D52525">*</span>：</label>' +
                    '                <button type="button" class="btn inp_1" style="margin-top: 20px" id="terpriseFile">' +
                    '                    <i class="fa fa-cloud"></i>请上传营业执照（pdf或jpg）' +
                    '                </button>' +
                    '                <input type="text" value="'+res.trainInfoDO.enterpriseFile+'" style="opacity:0;width: 1px;" id="cachet" name="cachet"/>' +
                    '                <span id="test1">'+ subFileName(res.trainInfoDO.enterpriseFile) +'</span>' +
                    '                <div style="clear: both"></div>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <button class="form-control but_1 send" type="button">提交审核</button>' +
                    '                <button class="form-control but_1" onclick="saveCao()" type="button">保存草稿</button>' +
                    '            </div>';
            } else {
                $('#adre').citys({province: "请选择"});
                info =
                    '            <div id="kptd">' +
                    '               <div class="kptd">' +

                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="联系人姓名" id="contacts"  class="form-control inp_1 contacts"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="职务" id="posts"  class="form-control inp_1 posts"/>' +
                    '                    </div>' +

                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="number"  placeholder="联系电话" id="phone"  class="form-control inp_1 phone"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">电子邮箱<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="请输入电子邮箱" id="email"  class="form-control inp_1 email"/>' +
                    '                    </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    // '                <span><input type="button" onclick="insert();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +
                    '<div class="line">管理团队</div>' +
                    '    <div id="adminTeamDiv">' +
                    '            <div class="allInfo">'+
                    '               <div class="div_3">' +
                    '                        <label class="span_1">工作场地<span style="color: #D52525">*</span>：</label>' +
                    '                       <input type="text" placeholder="工作场地" id="workSpace"  class="form-control inp_1 workSpace"/>' +
                    '                    </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="workSpaceUpload">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传工作场地支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="workSpaceFile" name="workSpaceFile"/>' +
                    '                	 <span id="workSpaceFileTest"></span>' +
                    '            	 </div>' +
                    '            	 </div>' +
                    '               <div class="adminTeamDiv">' +
                    '                   <div class="div_3">' +
                    '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 adminName"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="学历" class="form-control inp_1 education"/>' +
                    '                    </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="educationUpload0">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="educationFile" id="educationFile0" name="educationFile0"/>' +
                    '                	 <span id="educationFileTest0"></span>' +
                    '            	 </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="职务"  class="form-control inp_1 position"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">人员类型<span style="color: #D52525">*</span>：</label>' +
                    '                        <select class="form-control inp_1 adminType">' +
                    '                            <option value="">请选择人员类型</option>' +
                    '                            <option value="专职管理人员">专职管理人员</option>' +
                    '                            <option value="专职工作人员">专职工作人员</option>' +
                    '                        </select>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="number"  placeholder="联系电话"  class="form-control inp_1 adminMobile"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 adminWork"/>' +
                    '                    </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '<div class="line">专家团队</div>' +
                    '    <div id="expertTeamDiv">' +
                    '               <div class="expertTeamDiv">' +
                    '                   <div class="div_3">' +
                    '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 expertName"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="学历" class="form-control inp_1 expertEducation"/>' +
                    '                    </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertEducationUpload0">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertEducationFile" id="expertEducationFile0" name="expertEducationFile0"/>' +
                    '                	 <span id="expertEducationFileTest0"></span>' +
                    '            	 </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="职务"  class="form-control inp_1 expertPosition"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">职称<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="职称"  class="form-control inp_1 expertJobName"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">专家类型<span style="color: #D52525">*</span>：</label>' +
                    '                        <select class="form-control inp_1 expertType">' +
                    '                            <option value="">请选择岗位</option>' +
                    '                            <option value="师资及考评员">师资及考评员</option>' +
                    '                            <option value="考务技术员">考务技术员</option>' +
                    '                            <option value="督导员">督导员</option>' +
                    '                            <option value="其他">其他</option>' +
                    '                        </select>' +
                    '                    </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">专家证件材料<span style="color: #D52525">*</span>：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertCertificatesUpload0">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传专家证件材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertCertificatesFile" id="expertCertificatesFile0" name="expertCertificatesFile0"/>' +
                    '                	 <span id="expertCertificatesFileTest0"></span>' +
                    '            	 </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">专家证件编号<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="专家证件编号"  class="form-control inp_1 expertNum"/>' +
                    '                        <span style="color:red"></span>'+
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="number"  placeholder="联系电话"  class="form-control inp_1 expertMobile"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 expertWork"/>' +
                    '                    </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert2();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '<div class="line">合作企业</div>' +
                    '    <div id="cooperationEnterpriseDiv">' +
                    '               <div class="cooperationEnterpriseDiv">' +
                    '                   <div class="div_3">' +
                    '                        <label class="span_1">企业名称<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text" placeholder="请输入企业名称"  class="form-control inp_1 enterpriseName"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">营业地址<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="营业地址" class="form-control inp_1 enterpriseAddress"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">主营业务<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="主营业务"  class="form-control inp_1 serviceMain"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">法定代表人<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="法定代表人"  class="form-control inp_1 enterprisePerson"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="text"  placeholder="联系人"  class="form-control inp_1 contactName"/>' +
                    '                    </div>' +
                    '                    <div class="div_3">' +
                    '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
                    '                        <input type="number"  placeholder="联系电话"  class="form-control inp_1 contactMobile"/>' +
                    '                    </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '                <span><input type="button" onclick="insert3();" value="新增" class="addBtn" /></span>' +
                    '            </div>' +

                    '            <div class="line">单位基本情况</div>' +
                    '            <div id="basicInfoExplainDiv">' +
                    '               <div class="basicInfoExplainDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="单位基本情况，主要包括：现有员工数量、员工学历层次、每年新招人数、行业协会任职情况、获奖情况、参与标准建设情况、社会影响等" id="basicInfoExplain"  class="form-control inp_2 basicInfoExplain"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="basicInfoFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="basicInfoExplainEnclosure" name="basicInfoExplainEnclosure"/>' +
                    '                	 <span id="basicInfoFileTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">考核评价工作基础</div>' +
                    '            <div id="assevaInfoExplainDiv">' +
                    '               <div class="assevaInfoExplainDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="考核评价工作基础，主要包括：近年来在幼儿照护领域组织开展考核评价，特别是承接政府委托的职业技能鉴定、考核评价相关业务情况，如考评的层次、结构、数量、规模等；考评有关管理规章制度等" id="assevaInfoExplain" class="form-control inp_2 assevaInfoExplain"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="assevaInfoFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="assevaInfoExplainEnclosure" name="assevaInfoExplainEnclosure"/>' +
                    '                	 <span id="assevaInfoExplainTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">培训基本情况</div>' +
                    '            <div id="trainInfoDiv">' +
                    '               <div class="trainInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="培训基本情况，主要包括：开展培训的工种和层次、培训人数、师资团队介绍、培训教学资源、承接的扶贫培训工作开展情况、教学教务管理规章制度等" id="trainInfo" class="form-control inp_2 trainInfo"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="trainFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="trainInfoEnclosure" name="trainInfoEnclosure"/>' +
                    '                	 <span id="trainInfoTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">实习/见习及就业基本情况</div>' +
                    '            <div id="internshipInfoDiv">' +
                    '               <div class="internshipInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="实习/见习及就业基本情况，主要包括：实习/见习基地建设情况、每年实习/见习人数、实习/见习制度、就业渠道建设情况、每年计划安排实习/见习及就业人数等" id="internshipInfo" class="form-control inp_2 internshipInfo"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="internshipFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="internshipInfoEnclosure" name="internshipInfoEnclosure"/>' +
                    '                	 <span id="internshipInfoTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">校企合作情况</div>' +
                    '            <div id="schoolEnterpriseInfoDiv">' +
                    '               <div class="schoolEnterpriseInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="校企合作，主要内容：与学校或企业合作的情况，如共同培养技能人才、共同开展教学资源库建设、共同开展课题建设、共同开展标准建设等" id="schoolEnterpriseInfo" class="form-control inp_2 schoolEnterpriseInfo"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="schoolEnterpriseFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="schoolEnterpriseInfoEnclosure" name="schoolEnterpriseInfoEnclosure"/>' +
                    '                	 <span id="schoolEnterpriseInfoTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">场地及设施设备情况</div>' +
                    '            <div id="equipmentInfoDiv">' +
                    '               <div class="equipmentInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="场地及设施设备情况，主要内容：目前开展社会考生培训的场地、设施设备等情况" id="equipmentInfo" class="form-control inp_2 equipmentInfo"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="equipmentFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="equipmentInfoEnclosure" name="equipmentInfoEnclosure"/>' +
                    '                	 <span id="equipmentInfoTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="line">考核评价建议</div>' +
                    '            <div id="assessmentInfoDiv">' +
                    '               <div class="assessmentInfoDiv">' +
                    '                <div class="div_3">' +
                    '                    <label class="span_1">具体内容<span style="color: #D52525">*</span>：</label>' +
                    '                    <textarea placeholder="考核评价建议，主要内容：下一步参与幼儿照护职业技能等级证书建设的有关工作考虑，能够提供的条件保障等" id="assessmentInfo" class="form-control inp_2 assessmentInfo"></textarea>' +
                    '                </div>' +
                    '            	 <div class="div_3">' +
                    '                	 <label class="span_1">支撑材料：</label>' +
                    '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="assessmentFile">' +
                    '                    		 <i class="fa fa-cloud"></i>请上传支撑材料' +
                    '               	 	 </button>' +
                    '                	 <input type="text" style="opacity:0;width: 1px;" value="" id="assessmentInfoEnclosure" name="assessmentInfoEnclosure"/>' +
                    '                	 <span id="assessmentInfoTest"></span>' +
                    '            	 </div>' +
                    '               </div>' +
                    '            </div>' +
                    '            <div>' +
                    '            </div>' +

                    '            <div class="div_3">' +
                    '                <label class="span_1">承诺书<span style="color: #D52525">*</span>：</label>' +
                    '                <button type="button" class="btn inp_1" style="margin-top: 20px" id="btnUpload">' +
                    '                    <i class="fa fa-cloud"></i>请盖章扫描后上传' +
                    '                </button>' +
                    '                <input type="text" style="opacity:0;width: 1px;" value="" id="enclosure" name="enclosure"/>' +
                    '                <span id="test"></span>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <label class="span_1">承诺书模板下载：</label>' +
                    '                <label style="height: 50px;float: left;margin: 20px 10px auto auto;font-size: 16px;line-height: 50px;">' +
                    '                    <a target="_blank" style="color: blue" download href="' + cnFile + '">' + cnTitle + '</a>' +
                    '                </label>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <label class="span_1">营业执照<span style="color: #D52525">*</span>：</label>' +
                    '                <button type="button" class="btn inp_1" style="margin-top: 20px" id="terpriseFile">' +
                    '                    <i class="fa fa-cloud"></i>请上传营业执照（pdf或jpg）' +
                    '                </button>' +
                    '                <input type="text" style="opacity:0;width: 1px;" id="cachet" name="cachet"/>' +
                    '                <span id="test1"></span>' +
                    '                <div style="clear: both"></div>' +
                    '            </div>' +
                    '            <div class="div_3">' +
                    '                <button class="form-control but_1 send" type="button">提交审核</button>' +
                    '                <button class="form-control but_1" onclick="saveCao()" type="button">保存草稿</button>' +
                    '            </div>';

            }

            $('#info').html(info);

            //管理团队学历证明材料上传接口绑定
            for(var i=1;i<educationUploadIndex;i++){
                $('#adminTeamDiv').append('<script>' +
                    '$(function (){' +
                    '        layui.use("upload", function () {' +
                    '            var upload = layui.upload;' +
                    '            upload.render({' +
                    '                elem: "#educationUpload'+i+'",'+
                    '                url: "/jzApi/utils/fileImprot",' +
                    '                size: 1000,' +
                    '                accept: "file",' +
                    '                done: function (r) {' +
                    '                    $("#educationFile'+i+'").val(r.data);' +
                    '                    $("#educationFileTest'+i+'").html(subFileName(r.data));'+
                    '                },' +
                    '                error: function (r) {' +
                    '                    layer.msg(r.msg);' +
                    '                }' +
                    '            });' +
                    '        });' +
                    '})');
            }

            //var expertCertificatesUploadIndex=1;
            for(var i=1;i<expertEducationUploadIndex;i++){
                $('#expertTeamDiv').append('<script>' +
                    '$(function (){' +
                    '        layui.use("upload", function () {' +
                    '            var upload = layui.upload;' +
                    '            upload.render({' +
                    '                elem: "#expertEducationUpload'+i+'",'+
                    '                url: "/jzApi/utils/fileImprot",' +
                    '                size: 1000,' +
                    '                accept: "file",' +
                    '                done: function (r) {' +
                    '                    $("#expertEducationFile'+i+'").val(r.data);' +
                    '                    $("#expertEducationFileTest'+i+'").html(subFileName(r.data));'+
                    '                },' +
                    '                error: function (r) {' +
                    '                    layer.msg(r.msg);' +
                    '                }' +
                    '            });' +
                    '        });' +
                    '});'+
                    '$(function (){' +
                    '        layui.use("upload", function () {' +
                    '            var upload = layui.upload;' +
                    '            upload.render({' +
                    '                elem: "#expertCertificatesUpload'+i+'",'+
                    '                url: "/jzApi/utils/fileImprot",' +
                    '                size: 1000,' +
                    '                accept: "file",' +
                    '                done: function (r) {' +
                    '                    $("#expertCertificatesFile'+i+'").val(r.data);' +
                    '                    $("#expertCertificatesFileTest'+i+'").html(subFileName(r.data));'+
                    '                },' +
                    '                error: function (r) {' +
                    '                    layer.msg(r.msg);' +
                    '                }' +
                    '            });' +
                    '        });' +
                    '})');
            }

            $('.delAdminTeam').click(function () {
                $(this).parent('.div_3').parent('.adminTeamDiv').remove()
            })
            $('.delExpertTeam').click(function () {
                $(this).parent('.div_3').parent('.expertTeamDiv').remove()
            })
            $('.delCooperationEnterprise').click(function () {
                $(this).parent('.div_3').parent('.cooperationEnterpriseDiv').remove()
            })

            //营业执照
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#terpriseFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 1000,
                    // accept: 'images',
                    exts: 'jpg|png|jpeg|pdf',
                    accept: 'file',
                    done: function (r) {
                        $("#cachet").val(r.data);
                        $("#test1").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //承诺书
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#btnUpload', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 1000,
                    accept: 'file',
                    done: function (r) {
                        $("#enclosure").val(r.data);
                        $("#test").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //单位基本情况
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#basicInfoFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#basicInfoFileEnclosure").val(r.data);
                        $("#basicInfoFileTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //考核评价说明
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#assevaInfoFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#assevaInfoExplainEnclosure").val(r.data);
                        $("#assevaInfoExplainTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //培训基本情况
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#trainFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#trainInfoEnclosure").val(r.data);
                        $("#trainInfoTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //实习，见习及就业基本情况
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#internshipFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#internshipInfoEnclosure").val(r.data);
                        $("#internshipInfoTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            //校企合作情况
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#schoolEnterpriseFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#schoolEnterpriseInfoEnclosure").val(r.data);
                        $("#schoolEnterpriseInfoTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //场地及设施设备情况
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#equipmentFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#equipmentInfoEnclosure").val(r.data);
                        $("#equipmentInfoTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //考核评价建议
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#assessmentFile', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#assessmentInfoEnclosure").val(r.data);
                        $("#assessmentInfoTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //管理团队学历证明材料
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#workSpaceUpload', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 10000,
                    accept: 'file',
                    done: function (r) {
                        $("#workSpaceFile").val(r.data);
                        $("#workSpaceFileTest").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //管理团队学历证明材料
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#educationUpload0', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 1000,
                    accept: 'file',
                    done: function (r) {
                        $("#educationFile0").val(r.data);
                        $("#educationFileTest0").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //专家团队学历证明材料
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#expertEducationUpload0', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 1000,
                    accept: 'file',
                    done: function (r) {
                        $("#expertEducationFile0").val(r.data);
                        $("#expertEducationFileTest0").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });
            //专家团队证件材料
            layui.use('upload', function () {
                var upload = layui.upload;
                //执行实例
                upload.render({
                    elem: '#expertCertificatesUpload0', //绑定元素
                    url: '/jzApi/utils/fileImprot', //上传接口
                    size: 1000,
                    accept: 'file',
                    done: function (r) {
                        $("#expertCertificatesFile0").val(r.data);
                        $("#expertCertificatesFileTest0").html(subFileName(r.data));
                    },
                    error: function (r) {
                        layer.msg(r.msg);
                    }
                });
            });

            $('.send').click(function () {
                if ($('#province').val() == "") {
                    layer.msg("省份不能为空");
                    return false;
                }
                if ($('#enterpriseName').val() == "") {
                    layer.msg("单位名称不能为空");
                    return false;
                }
                if ($('#enterpriseAddress').val() == "") {
                    layer.msg("单位地址不能为空");
                    return false;
                }
                if ($('#enterprisePerson').val() == "") {
                    layer.msg("法人代表不能为空");
                    return false;
                }
                if ($('#contacts').val() == "") {
                    layer.msg("联系人不能为空");
                    return false;
                }
                if ($('#posts').val() == "") {
                    layer.msg("联系人职务不能为空");
                    return false;
                }
                if ($('#phone').val() == "") {
                    layer.msg("联系人电话不能为空");
                    return false;
                }
                if ($('#email').val() == "") {
                    layer.msg("联系人电子邮箱不能为空");
                    return false;
                }
                if ($('#businessScope').val() == "") {
                    layer.msg("营业范围不能为空");
                    return false;
                }

                if ($('#basicInfoExplain').val() == "") {
                    layer.msg("单位基本情况内容不能为空");
                    return false;
                }
                if ($('#assevaInfoExplain').val() == "") {
                    layer.msg("考核评价工作基础内容不能为空");
                    return false;
                }
                if ($('#trainInfo').val() == "") {
                    layer.msg("培训基本情况内容不能为空");
                    return false;
                }
                if ($('#internshipInfo').val() == "") {
                    layer.msg("实习,见习及就业基本情况内容不能为空");
                    return false;
                }
                if ($('#schoolEnterpriseInfo').val() == "") {
                    layer.msg("校企合作情况内容不能为空");
                    return false;
                }
                if ($('#equipmentInfo').val() == "") {
                    layer.msg("场地及设施设备情况内容不能为空");
                    return false;
                }
                if ($('#assessmentInfo').val() == "") {
                    layer.msg("考核评价建议内容不能为空");
                    return false;
                }
                if ($('#enclosure').val() == "") {
                    layer.msg("请上传承诺书");
                    return false;
                }
                if ($('#cachet').val() == "") {
                    layer.msg("请上传营业执照");
                    return false;
                }

                if ($('#workSpace').val() == "") {
                   layer.msg("管理团队工作场地不能为空");
                   return false;
                }
                //管理团队
                 var adminTeamList = [];
                var at = true;
                var adminNum=0;
                var wokerNum=0;
                $(".adminTeamDiv").each(function (item, index) {
                    var adminName = $(this).find(".adminName").val();
                    var education = $(this).find(".education").val();
                    var educationFile = $(this).find('.educationFile').val();
                    var position = $(this).find('.position').val();
                    var adminType = $(this).find('.adminType').val();
                    var adminMobile = $(this).find('.adminMobile').val();
                    var adminWork = $(this).find('.adminWork').val();
                    if (adminName == '' || education == '' || educationFile == '' || position == '' || adminType == ''||adminMobile == '' || adminWork == '' ) {
                        layer.msg('管理团队信息填写不完整');
                        at = false;
                    }
                    if(adminType == '专职管理人员')adminNum+=1;
                    else if(adminType == '专职工作人员')wokerNum+=1;
                    adminTeamList.push({
                        adminName: adminName,
                        education: education,
                        educationFile: educationFile,
                        position: position,
                        adminType: adminType,
                        adminMobile: adminMobile,
                        adminWork: adminWork
                    });
                })
                if (at == false) {
                    return at;
                }
                if(adminNum<3){
                    layer.msg('管理团队,专职管理人员不得少于3名');
                    return false;
                }
                if(wokerNum<5){
                    layer.msg('管理团队,专职工作人员不得少于5名');
                    return false;
                }

                //专家团队
                 var expertTeamList = [];
                var et = true;
                var szNum=0;
                var kwNum=0;
                var ddNum=0;
                $(".expertTeamDiv").each(function (item, index) {
                    var expertName = $(this).find(".expertName").val();
                    var expertEducation = $(this).find(".expertEducation").val();
                    var expertEducationFile = $(this).find('.expertEducationFile').val();
                    var expertPosition = $(this).find('.expertPosition').val();
                    var expertJobName = $(this).find('.expertJobName').val();
                    var expertType = $(this).find('.expertType').val();
                    var expertCertificatesFile = $(this).find('.expertCertificatesFile').val();
                    var expertNum = $(this).find('.expertNum').val();
                    var expertMobile = $(this).find('.expertMobile').val();
                    var expertWork = $(this).find('.expertWork').val();
                    if (expertName == '' || expertEducation == '' || expertEducationFile == ''
                        || expertPosition == '' || expertJobName == ''||expertType == ''
                        || expertMobile == '' || expertWork == ''||expertCertificatesFile == '' || expertNum == ''  ) {
                        layer.msg('专家团队信息填写不完整');
                        et = false;
                    }
                    if(expertType == '师资及考评员')szNum+=1;
                    else if(expertType == '考务技术员')kwNum+=1;
                    else if(expertType == '督导员')ddNum+=1;
                    expertTeamList.push({
                        expertName: expertName,
                        expertEducation: expertEducation,
                        expertEducationFile: expertEducationFile,
                        expertPosition: expertPosition,
                        expertJobName: expertJobName,
                        expertType: expertType,
                        expertCertificatesFile: expertCertificatesFile,
                        expertNum: expertNum,
                        expertMobile: expertMobile,
                        expertWork: expertWork
                    });
                })
                if (et == false) {
                    return et;
                }
                if(szNum<6){
                    layer.msg('专家团队,师资及考评员不得少于6名');
                    return false;
                }
                if(kwNum<2){
                    layer.msg('专家团队,考务技术员不得少于2名');
                    return false;
                }
                if(ddNum<2){
                    layer.msg('专家团队,督导员不得少于2名');
                    return false;
                }

                //合作企业
                var cooperationEnterpriseList = [];
                var ct = true;
                var cooperationNum=0;
                $(".cooperationEnterpriseDiv").each(function (item, index) {
                    var enterpriseName = $(this).find(".enterpriseName").val();
                    var enterpriseAddress = $(this).find(".enterpriseAddress").val();
                    var serviceMain = $(this).find('.serviceMain').val();
                    var enterprisePerson = $(this).find('.enterprisePerson').val();
                    var contactName = $(this).find('.contactName').val();
                    var contactMobile = $(this).find('.contactMobile').val();
                    if (enterpriseName == '' || enterpriseAddress == '' || serviceMain == '' || enterprisePerson == '' || contactName == ''||contactMobile == '' ) {
                        layer.msg('合作企业信息填写不完整');
                        ct = false;
                    }
                    cooperationNum+=1;
                    cooperationEnterpriseList.push({
                        enterpriseName: enterpriseName,
                        enterpriseAddress: enterpriseAddress,
                        serviceMain: serviceMain,
                        enterprisePerson: enterprisePerson,
                        contactName: contactName,
                        contactMobile: contactMobile
                    });
                })
                if (ct == false) {
                    return at;
                }
                if(cooperationNum<10){
                    layer.msg('合作企业不得少于10家');
                    return false;
                }


                ajaxToken("/jzApi/trainInfo/save", 'POST', {
                    province: $("#province").val(),
                    enterpriseName: $('#enterpriseName').val(),
                    enterpriseAddress: $('#enterpriseAddress').val(),
                    enterprisePerson: $('#enterprisePerson').val(),
                    contacts: $('#contacts').val(),
                    posts: $('#posts').val(),
                    phone: $('#phone').val(),
                    email:$('#email').val(),
                    businessScope: $('#businessScope').val(),
                    basicInfoExplain: $('#basicInfoExplain').val(),
                    basicInfoFile: $('#basicInfoExplainEnclosure').val(),
                    assevaInfoExplain:$('#assevaInfoExplain').val(),
                    assevaInfoFile: $('#assevaInfoExplainEnclosure').val(),
                    trainInfo: $('#trainInfo').val(),
                    trainFile: $('#trainInfoEenclosure').val(),
                    internshipInfo: $('#internshipInfo').val(),
                    internshipFile: $('#internshipInfoEnclosure').val(),
                    schoolEnterpriseInfo: $('#schoolEnterpriseInfo').val(),
                    schoolEnterpriseFile: $('#schoolEnterpriseInfoEnclosure').val(),
                    equipmentInfo: $('#equipmentInfo').val(),
                    equipmentFile: $('#equipmentInfoEnclosure').val(),
                    assessmentInfo: $('#assessmentInfo').val(),
                    assessmentFile: $('#assessmentInfoEnclosure').val(),
                    commitmentFile: $('#enclosure').val(),
                    enterpriseFile: $('#cachet').val(),
                    adminTeam: JSON.stringify(adminTeamList),
                    adminWorkSpace:$('#workSpace').val(),
                    adminWorkSpaceFile:$('#workSpaceFile').val(),
                    expertTeam: JSON.stringify(expertTeamList),
                    cooperationEnterprise : JSON.stringify(cooperationEnterpriseList)
                }, function (r) {
                       location.href = "/certificate/stationPxRecordList";
                });
            })
        })
    });

    function insert() {
        $('#adminTeamDiv').append('<div class="adminTeamDiv">' +
            '                   <div class="div_3">' +
            '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 adminName"/>' +
            '                    <span class="del" id="del">删除</span>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="学历" class="form-control inp_1 education"/>' +
            '                    </div>' +
            '            	 <div class="div_3">' +
            '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="educationUpload'+educationUploadIndex+'">' +
            '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
            '               	 	 </button>' +
            '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="educationFile" id="educationFile'+educationUploadIndex+'" name="educationFile'+educationUploadIndex+'"/>' +
            '                	 <span id="educationFileTest'+educationUploadIndex+'"></span>' +
            '            	 </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="职务"  class="form-control inp_1 position"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">人员类型<span style="color: #D52525">*</span>：</label>' +
            '                        <select class="form-control inp_1 adminType">' +
            '                            <option value="">请选择岗位</option>' +
            '                            <option value="专职管理人员">专职管理人员</option>' +
            '                            <option value="专职工作人员">专职工作人员</option>' +
            '                        </select>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="联系电话"  class="form-control inp_1 adminMobile"/>' +
            '                    </div>' +
            '                    <div class="div_3" style="margin-bottom:15px;">' +
            '                        <label class="span_1" >工作职责<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 adminWork"/>' +
            '                    </div>' +
            '<script>' +
            '$(function (){' +
            '        layui.use("upload", function () {' +
            '            var upload = layui.upload;' +
            '            upload.render({' +
            '                elem: "#educationUpload'+educationUploadIndex+'",'+
            '                url: "/jzApi/utils/fileImprot",' +
            '                size: 1000,' +
            '                accept: "file",' +
            '                done: function (r) {' +
            '                    $("#educationFile'+educationUploadIndex+'").val(r.data);' +
            '                    $("#educationFileTest'+educationUploadIndex+'").html(subFileName(r.data));'+
            '                },' +
            '                error: function (r) {' +
            '                    layer.msg(r.msg);' +
            '                }' +
            '            });' +
            '        });' +
            '})');
        educationUploadIndex+=1;
        $('.del').click(function () {
            $(this).parent('.div_3').parent('.adminTeamDiv').remove()
        })

    }

    function insert2() {
        $('#expertTeamDiv').append('<div class="expertTeamDiv">' +
            '                   <div class="div_3" >' +
            '                        <label class="span_1">姓名<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text" placeholder="请输入姓名"  class="form-control inp_1 expertName"/>' +
            '                    <span class="del" id="del">删除</span>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">学历<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="学历" class="form-control inp_1 expertEducation"/>' +
            '                    </div>' +
            '            	 <div class="div_3">' +
            '                	 <label class="span_1">学历证件<span style="color: #D52525">*</span>：</label>' +
            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertEducationUpload'+expertEducationUploadIndex+'">' +
            '                    		 <i class="fa fa-cloud"></i>请上传学历证件' +
            '               	 	 </button>' +
            '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertEducationFile" id="expertEducationFile'+expertEducationUploadIndex+'" name="expertEducationFile'+expertEducationUploadIndex+'"/>' +
            '                	 <span id="expertEducationFileTest'+expertEducationUploadIndex+'"></span>' +
            '            	 </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">职务<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="职务"  class="form-control inp_1 expertPosition"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">职称<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="职称"  class="form-control inp_1 expertJobName"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">专家类型<span style="color: #D52525">*</span>：</label>' +
            '                        <select class="form-control inp_1 expertType">' +
            '                            <option value="">请选择岗位</option>' +
            '                            <option value="师资及考评员">师资及考评员</option>' +
            '                            <option value="考务技术员">考务技术员</option>' +
            '                            <option value="督导员">督导员</option>' +
            '                            <option value="其他">其他</option>' +
            '                        </select>' +
            '                    </div>' +
            '            	 <div class="div_3">' +
            '                	 <label class="span_1">专家证件材料<span style="color: #D52525">*</span>：</label>' +
            '                		 <button type="button" class="btn inp_1" style="margin-top: 20px" id="expertCertificatesUpload'+expertCertificatesUploadIndex+'">' +
            '                    		 <i class="fa fa-cloud"></i>请上传专家证件材料' +
            '               	 	 </button>' +
            '                	 <input type="text" style="opacity:0;width: 1px;" value="" class="expertCertificatesFile" id="expertCertificatesFile'+expertCertificatesUploadIndex+'" name="expertCertificatesFile'+expertCertificatesUploadIndex+'"/>' +
            '                	 <span id="expertCertificatesFileTest'+expertCertificatesUploadIndex+'"></span>' +
            '            	 </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">专家证件编号<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="专家证件编号"  class="form-control inp_1 expertNum"/>' +
            '                        <span style="color:red">注意：如果是师资及考评员则需要填写两个编号，以英文分号(;)隔开</span>'+
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="联系电话"  class="form-control inp_1 expertMobile"/>' +
            '                    </div>' +
            '                    <div class="div_3" style="margin-bottom:15px;">' +
            '                        <label class="span_1">工作职责<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="工作职责"  class="form-control inp_1 expertWork"/>' +
            '                    </div>' +
            '<script>' +
            '$(function (){' +
            '        layui.use("upload", function () {' +
            '            var upload = layui.upload;' +
            '            upload.render({' +
            '                elem: "#expertEducationUpload'+expertEducationUploadIndex+'",'+
            '                url: "/jzApi/utils/fileImprot",' +
            '                size: 1000,' +
            '                accept: "file",' +
            '                done: function (r) {' +
            '                    $("#expertEducationFile'+expertEducationUploadIndex+'").val(r.data);' +
            '                    $("#expertEducationFileTest'+expertEducationUploadIndex+'").html(subFileName(r.data));'+
            '                },' +
            '                error: function (r) {' +
            '                    layer.msg(r.msg);' +
            '                }' +
            '            });' +
            '        });' +
            '});'+
        '$(function (){' +
        '        layui.use("upload", function () {' +
        '            var upload = layui.upload;' +
        '            upload.render({' +
        '                elem: "#expertCertificatesUpload'+expertCertificatesUploadIndex+'",'+
        '                url: "/jzApi/utils/fileImprot",' +
        '                size: 1000,' +
        '                accept: "file",' +
        '                done: function (r) {' +
        '                    $("#expertCertificatesFile'+expertCertificatesUploadIndex+'").val(r.data);' +
        '                    $("#expertCertificatesFileTest'+expertCertificatesUploadIndex+'").html(subFileName(r.data));'+
        '                },' +
        '                error: function (r) {' +
        '                    layer.msg(r.msg);' +
        '                }' +
        '            });' +
        '        });' +
        '})');
        expertEducationUploadIndex+=1;
        expertCertificatesUploadIndex+=1;
        $('.del').click(function () {
            $(this).parent('.div_3').parent('.expertTeamDiv').remove()
        })

    }

    function insert3() {
        $('#cooperationEnterpriseDiv').append('<div class="cooperationEnterpriseDiv" >' +
            '                   <div class="div_3" >' +
            '                        <label class="span_1"  >企业名称<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text" placeholder="请输入企业名称"  class="form-control inp_1 enterpriseName"/>' +
            '                    <span class="del" id="del">删除</span>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">营业地址<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="营业地址" class="form-control inp_1 enterpriseAddress"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">主营业务<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="主营业务"  class="form-control inp_1 serviceMain"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">法定代表人<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="法定代表人"  class="form-control inp_1 enterprisePerson"/>' +
            '                    </div>' +
            '                    <div class="div_3">' +
            '                        <label class="span_1">联系人<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="联系人"  class="form-control inp_1 contactName"/>' +
            '                    </div>' +
            '                    <div class="div_3" style="margin-bottom:15px;">' +
            '                        <label class="span_1">联系电话<span style="color: #D52525">*</span>：</label>' +
            '                        <input type="text"  placeholder="联系电话"  class="form-control inp_1 contactMobile"/>' +
            '                    </div>' +
            '</div>');
        $('.del').click(function () {
            $(this).parent('.div_3').parent('.cooperationEnterpriseDiv').remove()
        })

    }

    function saveCao() {
        nz_bg = window.setInterval("saveCao()", 300000);
        //管理团队
        var adminTeamList = [];
        $(".adminTeamDiv").each(function (item, index) {
            var adminName = $(this).find(".adminName").val();
            var education = $(this).find(".education").val();
            var educationFile = $(this).find('.educationFile').val();
            var position = $(this).find('.position').val();
            var adminType = $(this).find('.adminType').val();
            var adminMobile = $(this).find('.adminMobile').val();
            var adminWork = $(this).find('.adminWork').val();
            adminTeamList.push({
                adminName: adminName,
                education: education,
                educationFile: educationFile,
                position: position,
                adminType: adminType,
                adminMobile: adminMobile,
                adminWork: adminWork
            });
        })

        //专家团队
        var expertTeamList = [];
        $(".expertTeamDiv").each(function (item, index) {
            var expertName = $(this).find(".expertName").val();
            var expertEducation = $(this).find(".expertEducation").val();
            var expertEducationFile = $(this).find('.expertEducationFile').val();
            var expertPosition = $(this).find('.expertPosition').val();
            var expertJobName = $(this).find('.expertJobName').val();
            var expertType = $(this).find('.expertType').val();
            var expertCertificatesFile = $(this).find('.expertCertificatesFile').val();
            var expertNum = $(this).find('.expertNum').val();
            var expertMobile = $(this).find('.expertMobile').val();
            var expertWork = $(this).find('.expertWork').val();
            expertTeamList.push({
                expertName: expertName,
                expertEducation: expertEducation,
                expertEducationFile: expertEducationFile,
                expertPosition: expertPosition,
                expertJobName: expertJobName,
                expertType: expertType,
                expertCertificatesFile: expertCertificatesFile,
                expertNum: expertNum,
                expertMobile: expertMobile,
                expertWork: expertWork
            });
        })
        //合作企业
        var cooperationEnterpriseList = [];
        $(".cooperationEnterpriseDiv").each(function (item, index) {
            var enterpriseName = $(this).find(".enterpriseName").val();
            var enterpriseAddress = $(this).find(".enterpriseAddress").val();
            var serviceMain = $(this).find('.serviceMain').val();
            var enterprisePerson = $(this).find('.enterprisePerson').val();
            var contactName = $(this).find('.contactName').val();
            var contactMobile = $(this).find('.contactMobile').val();
            cooperationEnterpriseList.push({
                enterpriseName: enterpriseName,
                enterpriseAddress: enterpriseAddress,
                serviceMain: serviceMain,
                enterprisePerson: enterprisePerson,
                contactName: contactName,
                contactMobile: contactMobile
            });
        })
        ajaxToken1("/jzApi/trainInfo/saveDraft", 'POST', {
            province: $('#province').val(),
            enterpriseName: $('#enterpriseName').val(),
            enterpriseAddress: $('#enterpriseAddress').val(),
            enterprisePerson: $('#enterprisePerson').val(),
            contacts: $('#contacts').val(),
            posts: $('#posts').val(),
            phone: $('#phone').val(),
            email:$('#email').val(),
            businessScope: $('#businessScope').val(),
            basicInfoExplain: $('#basicInfoExplain').val(),
            basicInfoFile: $('#basicInfoExplainEnclosure').val(),
            assevaInfoExplain:$('#assevaInfoExplain').val(),
            assevaInfoFile: $('#assevaInfoExplainEnclosure').val(),
            trainInfo: $('#trainInfo').val(),
            trainFile: $('#trainInfoEenclosure').val(),
            internshipInfo: $('#internshipInfo').val(),
            internshipFile: $('#internshipInfoEnclosure').val(),
            schoolEnterpriseInfo: $('#schoolEnterpriseInfo').val(),
            schoolEnterpriseFile: $('#schoolEnterpriseInfoEnclosure').val(),
            equipmentInfo: $('#equipmentInfo').val(),
            equipmentFile: $('#equipmentInfoEnclosure').val(),
            assessmentInfo: $('#assessmentInfo').val(),
            assessmentFile: $('#assessmentInfoEnclosure').val(),
            commitmentFile: $('#enclosure').val(),
            enterpriseFile: $('#cachet').val(),
            adminTeam: JSON.stringify(adminTeamList),
            adminWorkSpace:$('#workSpace').val(),
            adminWorkSpaceFile:$('#workSpaceFile').val(),
            expertTeam: JSON.stringify(expertTeamList),
            cooperationEnterprise : JSON.stringify(cooperationEnterpriseList)
        }, function (r) {
            if (r.code == 0) {
                layer.msg("自动保存成功", {offset: "rb"});
            } else {
                layer.confirm(r.msg);
                window.clearInterval(nz_bg)
            }
        })
    }
</script>
</html>